import { parser } from "../parser/index";
import {Dispatcher} from "./Dispacher";
import { any } from "../../core/logic";

function process(message,callback){
    const back=any(message.back,true); 
    if(back){
        Dispatcher.instance().send(message,callback);
    }else{
        parser[message.type](message,callback);
    }
}
export {process}